package com.kharthick.game;

import java.io.File;
import java.io.FilenameFilter;

public class MapNameFilter implements FilenameFilter{
	public String[] getMapNames(String dir){
		File f = new File(dir);
		FilenameFilter ff = new MapNameFilter();
		String[] filenames = f.list(ff);
		
		//for(int i = 0; i < filenames.length; i++){
		//	System.out.println(filenames[i]);
		//}
		
		return filenames;
	}

	public boolean accept(File dir, String filename) {
		if(filename.endsWith(".xml")){
			return true;
		}
		return false;
	}
}
